package net.csdra.libraryborrowing.domain.user;

import net.csdra.libraryborrowing.domain.CMSJpaRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by add on 2017/10/16.
 */
public interface UserRepository extends CMSJpaRepository<User, String> {

    User findByUserNameAndPassword(String userName, String password);

    User findByOpenId(String openId);

    User findByOpenIdAndUserName(String openId, String userName);

    User findByUserName(String userName);

    List<User> findByUserName(String userName, Pageable pageable);
}
